//
//  TicketCell.m
//  WuJieLive
//
//  Created by 张瀚坤 on 2017/11/2.
//  Copyright © 2017年 zhk. All rights reserved.
//

#import "TicketCell.h"

@implementation TicketCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.useNowBtn.titleLabel.numberOfLines = 0;
    [self.useNowBtn setTitle:@"立即使用" forState:(UIControlStateNormal)];
    self.useNowBtn.titleLabel.font = FontSize(15);
    [self.useNowBtn setTitleColor:TextAssistColor forState:(UIControlStateNormal)];
}

- (void)bindDataWithModel:(TicketModel *)model
{
    self.moneyLabel.text = [NSString stringWithFormat:@"¥%@",model.coupon_price];
    self.timeLabel.text = [NSString stringWithFormat:@"有效期至:%@",model.end_time];
    self.nameLabel.text = model.coupon_name;
    NSMutableString * string = [NSMutableString string];
    for (int i = 0; i < model.coupon_category_name.count; i ++) {
        [string appendString:[NSString stringWithFormat:@"%@",model.coupon_category_name[i]]];
    }
    self.canUseGoodsLabel.text = [NSString stringWithFormat:@"适用范围:%@",string];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
